<?php
// 查看病例信息
// header("content-type:text/html;charset=UTF-8");
include_once("d_checkLogin.php");
include_once("conn.php");
include_once("d_getLoginInfo.php");

$cases_ID = $_GET['casesID'];

$select_cases = "SELECT * FROM cases_infos WHERE cases_ID = '" . $cases_ID . "'";

$result_cases = mysqli_query($connect_DB, $select_cases);
if ($result_cases && mysqli_num_rows($result_cases) > 0) {
    $row_cases = mysqli_fetch_object($result_cases);
} else {
    echo "<script>alert('参数错误！请稍后重试！');history.go(-1);</script>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="../public/pic/f.png" type="image/x-icon">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>医生·诊单上传</title>
    <link rel="stylesheet" href="../public/css/bootstrap.min.css">
    <script src="../public/js/bootstrap.bundle.min.js"></script>
    <link rel="stylesheet" href="../public/css/doc_public.css">
    <link rel="stylesheet" href="css/d_CasesTable.css">
</head>

<body>
    <header>
        <nav class="nav-top">
            <div class="logo-div">
                <img src="../public/pic/logo-h-w.png">
            </div>
            <div class="text-div">
                <p>为宠物提供最优质的服务</p>
            </div>
            <div class="info-div">
                <p>欢迎您，<name>
                        <?php echo $doc_Name; ?>
                    </name>
                </p>
                <a href="d_Logout.php">退出登录</a>
            </div>
        </nav>
    </header>
    <main>
        <div class="sidebar-div">
            <p>当 前 位 置</p>
            <a href="" class="sidebar-a a-active">
                <ul class="ul-active">
                    <li class="li-top li-top-active">医生工作模块</li>
                    <li>预约信息</li>
                    <li>诊单上传</li>
                    <li>状态设置</li>
                    <li class="li-active">接诊历史</li>
                </ul>
            </a>
            <a href="doc_PetBasicInfoQuery.php" class="sidebar-a">
                <ul class="ul-active">
                    <li class="li-top">宠物信息查询</li>
                    <li>基本信息</li>
                </ul>
            </a>
            <a href="doc_ReplayMsg.php" class="sidebar-a">
                <ul class="ul-active">
                    <li class="li-top">留言信息管理</li>
                    <li>回复留言</li>
                    <li>管理回复留言</li>
                </ul>
            </a>
            <a href="doc_ChangePersonInfo.php" class="sidebar-a">
                <ul class="ul-active">
                    <li class="li-top">个人信息管理</li>
                    <li>修改个人信息</li>
                    <li>重置登录密码</li>
                </ul>
            </a>
        </div>
        <div class="main-div">
            <div class="main-nav-top">
                <ul class="nav justify-content-center">
                    <li class="nav-item main-nav-top-item">
                        <a class="nav-link" href="doc_AcceptInfo.php">预约信息</a>
                    </li>
                    <li class="nav-item main-nav-top-item">
                        <a class="nav-link" href="">诊单上传</a>
                    </li>
                    <li class="nav-item main-nav-top-item">
                        <a class="nav-link" href="doc_SetStatus.php">状态设置</a>
                    </li>
                    <li class="nav-item main-nav-top-item">
                        <a class="nav-link active now" aria-current="page" href="doc_AdmissionHistory.php">接诊历史</a>
                    </li>
                </ul>
            </div>
            <div class="main-content">
                <div class="cases-table-div">
                    <div class="table-top-div">
                        <img src="../public/pic/logo-h-b.png">
                        <span><a href="doc_AdmissionHistory.php">点此返回</a></span>
                        <span>就诊单号：<?php echo $row_cases->cases_ID;?></span>
                        <h4>就 诊 记 录 单 · 医 生 查 看</h4>
                    </div>
                    <div class="table-infos-div">
                        <div>宠物昵称：<input type="text" value="<?php echo $row_cases->cases_petName;?>" disabled>
                        </div>
                        <div>宠物类型：<input type="text" value="<?php echo $row_cases->cases_petType;?>" disabled>
                        </div>
                        <div>就诊分类：<input type="text" value="<?php echo $row_cases->cases_orderType;?>" disabled></div>
                    </div>
                    <div class="table-result-div">
                        诊断结果：<?php echo $row_cases->cases_result;?>
                    </div>
                    <div class="table-result-div">
                        解决方案：<?php echo $row_cases->cases_deal;?>
                    </div>
                    <div class="table-bottom-div">
                        <div>上传医生：<input type="text" value="<?php echo $row_cases->cases_docName;?>" disabled></div>
                        <div>上传日期：<input type="text" value="<?php echo $row_cases->cases_date;?>" disabled></div>
                    </div>
                </div>
            </div>
        </div>
    </main>

</body>

</html>